﻿<%@ Page Language="C#" MasterPageFile="~/admin/MasterPage.master" AutoEventWireup="true" CodeFile="ThemDanhMuc.aspx.cs" Inherits="admin_Default2" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="phContent" Runat="Server">
<form id="frmCategory" runat="server" enctype="multipart/form-data">
         <div class="line">
            <label>&nbsp;</label>
            <h3>Thêm Danh Mục</h3>              
        </div>            
        <div class="error">            
            <asp:Label ID="lbError" runat="server" Text=""></asp:Label>
        </div> 
        <div class="line">
            <label>Danh Mục Cha:</label>
            <asp:DropDownList ID="ddlParent" runat="server" Width="220px" DataTextField="name" DataValueField="ID"></asp:DropDownList>
        </div>  
         <div class="line">
            <label>Tên Danh Mục:</label>
            <asp:TextBox ID="txtName" runat="server" Width="300px"></asp:TextBox>
            <em><asp:requiredfieldvalidator id="RequiredFieldValidator1" runat="server" controltovalidate="txtName" display="Dynamic" errormessage="Tên danh mục là bắt buộc"></asp:requiredfieldvalidator></em>
         </div>
        <div class="line">
            <label>Hình ảnh:</label>
            <asp:FileUpload ID="fImage" runat="server"/>
            <em>
                <asp:requiredfieldvalidator id="RequiredFieldValidator2" runat="server" controltovalidate="fImage" display="Dynamic" errormessage="File hình ảnh là bắt buộc"></asp:requiredfieldvalidator>                
                <asp:RegularExpressionValidator ID="fImageExpressionValidate" ControlToValidate="fImage" runat="server" Display="Dynamic" ErrorMessage="File không đúng định dạng hình ảnh" ValidationExpression="^.+(.jpg|.JPG|.gif|.GIF)$"></asp:RegularExpressionValidator>
            </em>
        </div>
        <div class="line">
            <label>Từ khóa:</label>
            <asp:TextBox ID="txtKeyWord" runat="server" TextMode="MultiLine" Width="500px" Height="200px"></asp:TextBox>
        </div>
        <div class="line">
            <label>&nbsp;</label>
            <asp:Button ID="btnSubmit" runat="server" Text="Thêm" OnClick="btnSubmit_Click" />
            <input type="button" value="Hủy Bỏ" onclick="location.href='./DanhMucSanPham.aspx'" />           
        </div>        
    </form>
</asp:Content>

